package com.seres.user.controller.api.interfaces;

import com.seres.annotation.AuthToken;
import com.seres.config.CacheInterface;
import com.seres.response.ApiResponse;
import com.seres.vo.SysInterface;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Tan-Bowen
 * @version 1.0
 * @description TODO
 * @date 2021/7/27 14:52
 */

@Api(value = "接口中心", tags = "接口中心-所有接口地址" )
@RestController
@RequestMapping("/api/interface")
public class InterfaceController {


    @Resource
    private CacheInterface urlCache;

    @GetMapping("/all")
    @ApiOperation(value = "所有接口列表")
    @AuthToken(checkToken = false,checkPower = false)
    public ApiResponse<List<SysInterface>> interfaces(){
        return ApiResponse.success(urlCache.all());
    }


}